#ifndef __CLIENT_H
#define __CLIENT_H
#include<wx/wx.h>
#include<wx/socket.h>

class Frame;

enum
{
	SOCKET_ID_CLIENT
};

class Client : public wxEvtHandler
{
private:
	wxIPV4address addr;
	wxSocketClient *m_clientSoc;
	Frame *m_frame;
	//wxSocketBase *sock;
public:
	Client();
	~Client();
	void SetFrame(Frame *frame);
	void Client::SetAddr(wxString hostname);
	void SocketEvent(wxSocketEvent& event);
	void CloseConnection();
	void SendCoord(int x1,int y1,int x2,int y2);
	void RcvCoord(wxSocketBase *);
	bool IsConnected();
	void SendText(wxString text);
	wxSocketClient *GetSocket();
	DECLARE_EVENT_TABLE()
};

#endif